﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Itech_Run.Domain.Shared.Base;

namespace Itech_Run.Sys.Domain.Entity
{

    public partial class Blog_Info: CustomAggregateRoot<string>
    {

        [ForeignKey("Sys_User")] 
        [Required]
        [StringLength(36)]
        public string Author { get; set; }

        /// <summary>
        /// 1 随笔;   2 文章;   3 日记
        /// </summary>

        public int Category { get; set; }

        [Required]
        [StringLength(200)]
        public string Title { get; set; }

        [Required]
        public string Content { get; set; }

        public bool? IsPublish { get; set; }

        public bool? AllowComment { get; set; }

        public bool? IsTop { get; set; }

        /// <summary>
        /// 1 公开;   2 仅登录用户;   3 只有我
        /// </summary>

        public int? WhoVisit { get; set; }

        public bool? IsDel { get; set; }
      
        [Column(TypeName = "dateTime")]
        public DateTime? TopTime { get; set; }
      
        [Column(TypeName = "dateTime")]
        public DateTime? DelTime { get; set; }

        public virtual Sys_User AuthorNavigation { get; set; }

        public virtual ICollection<Blog_Collect> Blog_Collect { get; } = new HashSet<Blog_Collect>();

        public virtual ICollection<Blog_Comment> Blog_Comment { get; } = new HashSet<Blog_Comment>();

        public virtual Blog_Interest Blog_Interest { get; set; }

        public virtual ICollection<Blog_PersonCategory_Map> Blog_PersonCategory_Map { get; } = new HashSet<Blog_PersonCategory_Map>();

        public virtual ICollection<Blog_PersonLabel_Map> Blog_PersonLabel_Map { get; } = new HashSet<Blog_PersonLabel_Map>();

    }
}
